package ar.edu.uba.fi.jmit.monitorengine.backend.server.mock;

import java.util.LinkedList;
import java.util.List;

import org.apache.log4j.Logger;

import ar.edu.uba.fi.jmit.monitorengine.backend.client.StatisticsService;
import ar.edu.uba.fi.jmit.monitorengine.backend.shared.dto.StatisticPair;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class StatisticsServiceMock extends RemoteServiceServlet implements StatisticsService {

	private static final long serialVersionUID = -3056596463039513224L;

	@Override
	public List<StatisticPair> getAllReceiverStatistics() {
		Logger.getLogger(this.getClass()).info("getAllReceiverStatistics");
		List<StatisticPair> statistics = new LinkedList<StatisticPair>();
		statistics.add(new StatisticPair("Received Messages", "2548763"));
		statistics.add(new StatisticPair("Received Messages in the last 10 minutes", "14233"));
		statistics.add(new StatisticPair("Received Messages in the last minute", "1953"));
		statistics.add(new StatisticPair("Average Messages per minute", String.valueOf(14233/60)));
		return statistics;
	}

}
